package D12_6z.Properties_2;

import java.io.FileReader;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

public class Demo2 {
    public static void main(String[] args) throws Exception {
        Map<String,String> map = new HashMap<>();
        Properties prop = new Properties();
        FileReader fr = new FileReader("mapdata.properties");
        prop.load(fr);
        for (Map.Entry<Object, Object> e : prop.entrySet()) {
            map.put((String) e.getKey(),(String) e.getValue());
        }
        for (Map.Entry<String, String> er : map.entrySet()) {
            System.out.println(er);
        }
    }
}
